//+------------------------------------------------------------------+
//|                                                                  |
//|                        Copyright 2012, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+

#property copyright "Copyright 2012, ppzhu."
#property link      "XXXXXXXX"

#include <stderror.mqh>
#include <stdlib.mqh>
#include <Common.mqh>


//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
string VERSION = "iBands";
string BaseComment  = "";
int init()
{
   BaseComment = Symbol() + VERSION;
   
   Print(">>>>>>>BaseComment:"   + BaseComment);
   InitLog(BaseComment);
   Log("---- init ----");
   
   return(0);
}


//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
{
   LogClose();
   return(0);
}


//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
{
   double bandUpPrice   = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_UPPER,0);
   double bandDownPrice = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_LOWER,0);
   
   Log(">>>>> bandUpPrice:" + bandUpPrice+"; bandDownPrice:"+bandDownPrice);
   return(0);
}


